//自定义封装请求
export const request=(params)=>{
  return new Promise((resolve, rejects)=>{
    const baseUrl = "https://api-hmugo-web.itheima.net/api/public/v1"
    wx.request({
      ...params,
      url:baseUrl+ params.url,
      success:(res=> {
        resolve(res)
      }),
      fail:(res=>{
        rejects(res)
      })
    })
  })
}
